﻿using netDxf.Entities;
using System.Text;
using MCPlatform.Dxf.Interfaces;
using System.IO;

namespace MCPlatform.Dxf.Writers
{
    public class DxfWriter : IDxfWriter
    {
        internal DxfWriter() { }

        public void WriteToFile(List<EntityObject> entities, string filePath)
        {
            using (var stream = File.Create(filePath))
            {
                WriteToStream(entities, stream);
            }
        }

        public void WriteToStream(List<EntityObject> entities, Stream stream)
        {
            using (var writer = new StreamWriter(stream, Encoding.UTF8))
            {
                // 这里应添加具体的DXF写入逻辑，将entities列表中的对象转换为DXF格式，并写入到流中
            }
        }
    }
}
